package com.zzjson.serial;

import lombok.Data;

import java.io.IOException;
import java.io.Serializable;
import java.util.List;

/**
 * <p>****************************************************************************</p>
 * <p><b>Copyright © 2010-2020 shuncom team All Rights Reserved<b></p>
 * <ul style="margin:15px;">
 * <li>Description : com.zzjson.serial</li>
 * <li>Version     : 1.0.0</li>
 * <li>Creation    : 2020年02月19日</li>
 * <li>@author     : zzy0_0</li>
 * </ul>
 * <p>****************************************************************************</p>
 */
@Data
public class User extends Father implements Serializable {

	private static final long serialVersionUID = 7485952552851143738L;

	private String name;

	private transient int age;

	private List<String> names;

	private void writeObject(java.io.ObjectOutputStream s) throws IOException {
		s.defaultWriteObject();

		s.writeObject(name);
	}

	private void readObject(java.io.ObjectInputStream s) throws IOException, ClassNotFoundException {
		s.defaultReadObject();
		name = (String) s.readObject();
	}
}

@Data
class Father {
	private String fatherName;
}
